home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / cxobj.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-08  |  5.1 KB  |  147 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * ACxObj wrapper class                                                      *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_CxObj_H
  12. #define ASAP_CxObj_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/Commodities.h>
  19. }
  20.  
  21. class ACxObj
  22. {
  23.  public:
  24.  inline static ACxObj * HotKey( STRPTR description, MsgPort *port, long id);
  25.  inline LONG ActivateCxObj(long Activate = true );
  26.  inline void AttachCxObj( CxObj *headObj);
  27.  inline void ClearCxObjError();
  28.  inline static ACxObj *CreateCxObj( unsigned long type, long arg1, long arg2 );
  29.  inline void * operator new (size_t, unsigned long type, long arg1, long arg2);
  30.  inline static ACxObj *CxBroker( struct NewBroker *nb, LONG *error );
  31.  inline void * operator new (size_t, NewBroker *nb, LONG *error);
  32.  inline LONG CxObjError();
  33.  inline ULONG CxObjType();
  34.  inline void DeleteCxObj();
  35.  inline void operator delete (void *co);
  36.  inline static void DeleteCxObjAll(CxObj *co);
  37.  inline void EnqueueCxObj( CxObj *headObj);
  38.  inline void InsertCxObj( CxObj *headObj, CxObj *pred = 0);
  39.  inline void RemoveCxObj();
  40.  inline LONG SetCxObjPri(long pri);
  41.  inline void SetFilter(STRPTR text);
  42.  inline void SetFilterIX(IX *ix);
  43.  inline void SetTranslate(InputEvent *events);
  44. };
  45. //-----------------------------------------------------------------------------
  46. ACxObj * ACxObj::HotKey (STRPTR description, MsgPort *port, long id )
  47. {
  48.  return (ACxObj *) ::HotKey(description, port, id);
  49. }
  50. //-----------------------------------------------------------------------------
  51. LONG ACxObj::ActivateCxObj (long Activate)
  52. {
  53.  return ::ActivateCxObj((LONG *) this, Activate);
  54. }
  55. //-----------------------------------------------------------------------------
  56. void ACxObj::AttachCxObj (CxObj *headObj)
  57. {
  58.  ::AttachCxObj(headObj, (CxObj *) this);
  59. }
  60. //-----------------------------------------------------------------------------
  61. void ACxObj::ClearCxObjError ()
  62. {
  63.  ::ClearCxObjError((CxObj *) this);
  64. }
  65. //-----------------------------------------------------------------------------
  66. ACxObj * ACxObj::CreateCxObj (unsigned long type, long arg1, long arg2)
  67. {
  68.  return (ACxObj *) ::CreateCxObj(type, arg1, arg2);
  69. }
  70. //-----------------------------------------------------------------------------
  71. void * ACxObj::operator new (size_t, unsigned long type, long arg1, long arg2)
  72. {
  73.  return ACxObj::CreateCxObj(type, arg1, arg2);
  74. }
  75. //-----------------------------------------------------------------------------
  76. ACxObj * ACxObj::CxBroker (NewBroker *nb, LONG *error)
  77. {
  78.  return (ACxObj *) ::CxBroker(nb, error);
  79. }
  80. //-----------------------------------------------------------------------------
  81. void * ACxObj::operator new (size_t, NewBroker *nb, LONG *error)
  82. {
  83.  return ACxObj::CxBroker(nb, error);
  84. }
  85. //-----------------------------------------------------------------------------
  86. LONG ACxObj::CxObjError ()
  87. {
  88.  return ::CxObjError((CxObj *) this);
  89. }
  90. //-----------------------------------------------------------------------------
  91. ULONG ACxObj::CxObjType ()
  92. {
  93.  return ::CxObjType((CxObj *) this);
  94. }
  95. //-----------------------------------------------------------------------------
  96. void ACxObj::DeleteCxObj ()
  97. {
  98.  ::DeleteCxObj((CxObj *) this);
  99. }
  100. //-----------------------------------------------------------------------------
  101. void ACxObj::operator delete (void *co)
  102. {
  103.  ((ACxObj *) co)->DeleteCxObj();
  104. }
  105. //-----------------------------------------------------------------------------
  106. void ACxObj::DeleteCxObjAll (CxObj *co)
  107. {
  108.  ::DeleteCxObjAll((CxObj *) co);
  109. }
  110. //-----------------------------------------------------------------------------
  111. void ACxObj::EnqueueCxObj (CxObj *headObj)
  112. {
  113.  ::EnqueueCxObj((CxObj *) headObj, (CxObj *) this);
  114. }
  115. //-----------------------------------------------------------------------------
  116. void ACxObj::InsertCxObj (CxObj *headObj, CxObj *pred)
  117. {
  118.  ::InsertCxObj(headObj, (CxObj *) this, pred);
  119. }
  120. //-----------------------------------------------------------------------------
  121. void ACxObj::RemoveCxObj ()
  122. {
  123.  ::RemoveCxObj((CxObj *) this);
  124. }
  125. //-----------------------------------------------------------------------------
  126. LONG ACxObj::SetCxObjPri (long pri)
  127. {
  128.  return ::SetCxObjPri((CxObj *) this, pri);
  129. }
  130. //-----------------------------------------------------------------------------
  131. void ACxObj::SetFilter (STRPTR text)
  132. {
  133.  ::SetFilter((CxObj *) this, text);
  134. }
  135. //-----------------------------------------------------------------------------
  136. void ACxObj::SetFilterIX (IX *ix)
  137. {
  138.  ::SetFilterIX((CxObj *) this, ix);
  139. }
  140. //-----------------------------------------------------------------------------
  141. void ACxObj::SetTranslate (InputEvent *events)
  142. {
  143.  ::SetTranslate((CxObj *) this, events);
  144. }
  145.  
  146. #endif
  147.